import request from '@/utils/request'

// 查询看房预约管理列表
export function listAppointmanage(query) {
  return request({
    url: '/appointmanage/appointmanage/list',
    method: 'get',
    params: query
  })
}

// 查询看房预约管理详细
export function getAppointmanage(viewingAppointmentId) {
  return request({
    url: '/appointmanage/appointmanage/' + viewingAppointmentId,
    method: 'get'
  })
}
// 查询用户信息
export function getNewMobileUser(mobileUserId) {
  return request({
    url: '/appointmanage/appointmanage/mobileUser/' + mobileUserId,
    method: 'get'
  })
}
// 查询房间信息
export function getNewRoom(roomId) {
  return request({
    url: '/appointmanage/appointmanage/room/' + roomId,
    method: 'get'
  })
}

// 新增看房预约管理
export function addAppointmanage(data) {
  return request({
    url: '/appointmanage/appointmanage',
    method: 'post',
    data: data
  })
}

// 修改看房预约管理
export function updateAppointmanage(data) {
  return request({
    url: '/appointmanage/appointmanage',
    method: 'put',
    data: data
  })
}

// 删除看房预约管理
export function delAppointmanage(viewingAppointmentId) {
  return request({
    url: '/appointmanage/appointmanage/' + viewingAppointmentId,
    method: 'delete'
  })
}
